import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

const app = createApp(App);

// 使用Ant Design Vue
import {
  Layout,
  Row,
  Col,
  Form,
  Input,
  Button,
  Tooltip,
  Menu,
  Dropdown,
  Avatar,
  Breadcrumb,
  Card,
  PageHeader,
  Table,
  Popconfirm,
  Switch,
  Popover,
  Modal,
  Select,
  Space,
  DatePicker,
  Upload,
  Tag,
  Image,
  Divider,
  Pagination,
  Comment,
} from "ant-design-vue";
app
  .use(Layout)
  .use(Row)
  .use(Col)
  .use(Form)
  .use(Input)
  .use(Button)
  .use(Tooltip)
  .use(Menu)
  .use(Dropdown)
  .use(Avatar)
  .use(Breadcrumb)
  .use(Card)
  .use(PageHeader)
  .use(Table)
  .use(Popconfirm)
  .use(Switch)
  .use(Popover)
  .use(Modal)
  .use(Select)
  .use(Space)
  .use(DatePicker)
  .use(Upload)
  .use(Tag)
  .use(Image)
  .use(Divider)
  .use(Pagination)
  .use(Comment);

// 导入Ant Design Vue样式
import "ant-design-vue/dist/antd.css";

// 导入公共样式
import "@/assets/styles/index.less";

// 全局配置message.config
import { message } from "ant-design-vue";
message.config({
  duration: 2,
  maxCount: 2,
});

// 导入日期处理类库
import moment from "moment";
// 导入中文语言
import "moment/locale/zh-cn";
// 设置语言环境
moment.locale("zh-cn");

app.use(store).use(router).mount("#app");
